﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UIWindow.Helper;
using UIWindow.Lucifer;

namespace UIWindow.Protocols.Fins
{
    public abstract class OmRonFinsBase : IProtocol
    {
        /// <summary>
        /// 长度
        /// </summary>
        public int Length { get; set; }
        protected MemoryStream _memoryStream = null;
        public OmRonFinsBase()
        {
            _memoryStream = new MemoryStream(5);
            _memoryStream.Write("FINS".ObjectToASCII(), 0, 4);
        }
        public virtual byte[] GetStream()
        {
            return _memoryStream.ToArray();
        }

        public IProtocol Handle(byte[] bytes)
        {
            return this;
        }
    }
}
